class BinaryTree:
    def __init__(self, root_obj):
        self.key = root_obj
        self.left = None
        self.right = None

    def insert_left(self, new_obj):
        if self.left is None:
            self.left = BinaryTree(new_obj)
        else:
            t = BinaryTree(new_obj)
            self.left, t.left = t, self.left

    def insert_right(self, new_obj):
        if self.right is None:
            self.right = BinaryTree(new_obj)
        else:
            t = BinaryTree(new_obj)
            self.right, t.right = t, self.right

    def get_right_child(self):
        return self.right

    def get_left_child(self):
        return self.left

    def set_root_obj(self, obj):
        self.key = obj

    def get_root_value(self):
        return self.key


if __name__ == '__main__':
    r = BinaryTree(12)
    r.insert_left(22)
    r.insert_right(14)
    print(r.get_root_value())
    print(r.get_left_child().get_root_value())